package com.xzs.user.service.impl;

import com.xzs.dao.AdminMapper;
import com.xzs.entity.Admin;
import com.xzs.user.service.AdminService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * Created by xzs on 2018/01/15.
 */
@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminMapper adminMapper;
    
    /**
     *	持久化
     */
     @Override
    public void save(Admin model){
    		adminMapper.insert(model);
    		throw new UnsupportedOperationException();
    }
    
    //更新
    @Override
    public void update(Admin model){
    		adminMapper.updateByPrimaryKey(model);
    		throw new UnsupportedOperationException();
    }
    
    //通过ID查找
    @Override
    public Admin findById(Integer id){
   	 	//return adminMapper.selectByPrimaryKey(id);
    		throw new UnsupportedOperationException();
    }
     
    //获取所有
    @Override
    public List<Admin> findAll(){
    		return adminMapper.selectAll();
   	 	//throw new UnsupportedOperationException();
    }

	@Override
	public void save(List<Admin> models) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void deleteById(Integer id) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void deleteByIds(String ids) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public List<Admin> findByIds(String ids) {
		// TODO Auto-generated method stub
		return null;
	}

}
